<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>

<div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>合同管理页面</span>
        </div>
        <div class="search">
        	<form method="get" action="${pageContext.request.contextPath }/contractlist">
				<span>合同编码：</span>
				<input name="contract_number" type="text"  value="${contract_number}">
				<input type="hidden" name="pageIndex" value="1"/>
				<input value="查 询" type="submit" id="searchbutton">
				<a href="${pageContext.request.contextPath }/add" style="font-size: 16px">添加合同</a>
			</form>
        </div>
        <!--合同操作表格-->
        <table class="providerTable" cellpadding="0" cellspacing="0" >
            <tr class="firstTr">
            	<th width="10%">合同编码</th>
            	<th width="10%">用户id</th>
            	<th width="10%">员工姓名</th>
                <th width="10%">合同开始时间</th>
                <th width="10%">合同结束时间</th>
                <th width="10%">合同内容</th>
                <th width="10%"> 操作       </th>
            </tr>
            <c:forEach var="contract" items="${contractlist}" varStatus="status">
			<tr> 
					<td>
					<span>${contract.contract_number }</span>
					</td>
					<td>
					<span>${contract.contract_id}</span>
					</td>
					<td>
					<span>${contract.name}</span>
					</td>
					<td>
					<span>${contract.contract_start }</span>
					</td>
					<td>
					<span>${contract.contract_over }</span>
					</td>
					<td>
					<span>${contract.contract_content }</span>
					</td>
					<td>
					 <span><a class="viewContract" href="javascript:;" id=${contract.id } ><img src="${pageContext.request.contextPath }/statics/images/read.png" alt="查看" title="查看"/></a></span>
					<span><a class="modifyContract" href="javascript:;" id=${contract.id }><img src="${pageContext.request.contextPath }/statics/images/xiugai.png" alt="修改" title="修改"/></a></span>
					<span><a class="deleteContract" href="javascript:;" id=${contract.id }><img src="${pageContext.request.contextPath }/statics/images/schu.png" alt="删除" title="删除"/></a></span>
					</td>
				</tr>
			</c:forEach>
        </table>
        <div class="page-bar">
            	<p>当前页:${pageIndex}/${totalPageCount}
    		<c:if test="${pageIndex > 1}">
    			<a href="contractlist?pageIndex=1">首页</a>
    			<a href="contractlist?pageIndex=${pageIndex-1}">上一页</a>
    		</c:if>
    		<c:if test="${pageIndex < totalPageCount}">
    			<a href="contractlist?pageIndex=${pageIndex+1}">下一页</a>
    			<a href="contractlist?pageIndex=${totalPageCount}">末页</a>
    		</c:if>
    	</p>
        </div>
    </div>
</section>
<div class="zhezhao"></div>
<div class="remove" id="removeProv">
   <div class="removerChid">
       <h2>提示</h2>
       <div class="removeMain" >
           <p>你确定要删除该条合同吗？</p>
           <a href="#" id="yes">确定</a>
           <a href="#" id="no">取消</a>
       </div>
   </div>
</div> 

<%@include file="/WEB-INF/jsp/common/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/contractlist.js"></script>

